package com.fast.user.model.member;

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

/**
 * 会员信息表 TODO 谁看过我 TODO 批量导入功能XLS
 * 
 * @author Administrator
 */
@Entity
@Table(name = "t_user_Member")
@DynamicInsert(true)
@DynamicUpdate(true)
public class Member {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id", unique = true, nullable = false, length = 10)
	private int id = 0;
	@Column(name = "uuid", length = 64)
	private String uuid = "";

	// ============================基本信息===开始======================================
	@Column(name = "nick_name", columnDefinition = ("varchar(64) comment '昵称'"))
	private String nickName = "";
	@Column(name = "mobile", columnDefinition = ("varchar(11) comment '手机号'"))
	private String mobile = "";
	@Column(name = "wexin_id", columnDefinition = ("varchar(32) comment '微信号'"))
	private String wexinId = "";
	@Column(name = "login_psd", columnDefinition = ("varchar(64) comment '登录密码'"))
	private String password = "";
	@Column(name = "email", columnDefinition = ("varchar(128) comment '邮箱'"))
	private String email = "";
	@Column(name = "real_name", columnDefinition = ("varchar(64) comment '真实姓名'"))
	private String realName = "";
	// 1代表男,0代表女,2代表不确定
	@Column(name = "sex", columnDefinition = ("int(1) comment '性别:1代表男,0代表女,2代表不确定'"))
	private int sex = 2;
	@Column(name = "m_birthday", columnDefinition = ("varchar(32) comment '生日'"))
	private String birthday = "";
	@Column(name = "age", columnDefinition = ("int(3) comment '年龄'"))
	private int age = 0;
	// 身高cm
	@Column(name = "m_height", columnDefinition = ("int(3) comment '身高（CM）'"))
	private int height = 0;
	// 体重kg
	@Column(name = "m_weight", columnDefinition = ("int(3) comment '体重（KG）'"))
	private int weight = 0;
	@Column(name = "head_image_url", columnDefinition = ("varchar(512) comment '头像地址'"))
	private String headImageUrl = "";
	@Column(name = "nationality", columnDefinition = ("varchar(64) comment '国家'"))
	private String nationality = "";
	@Column(name = "province", columnDefinition = ("varchar(64) comment '省份'"))
	private String province = "";// 省份
	@Column(name = "city", columnDefinition = ("varchar(64) comment '城市'"))
	private String city = "";// 城市
	// 所在地区 省市区具体位置
	@Column(name = "area", columnDefinition = ("varchar(64) comment '所在地区 省市区具体位置'"))
	private String area = "";
	@Column(name = "area_point", columnDefinition = ("varchar(256) comment '定位'"))
	private String areaPoint;// 位置
	@Column(name = "area_point_b", columnDefinition = ("varchar(256) comment '备用地址'"))
	private String areaPoint_b;// 备用位置
	@Column(name = "interest", columnDefinition = ("varchar(256) comment '兴趣爱好'"))
	private String interest;
	@Column(name = "barcode_url", columnDefinition = ("varchar(256) comment '二维码地址'"))
	private String barcodeUrl;
	@Column(name = "member_desc", columnDefinition = ("varchar(256) comment '简介'"))
	private String memberDesc = "";
	// 1、普通会员，2、VIP,3、商家会员，4、产品会员，5、业务员会员，6、白名单会员
	@Column(name = "member_grade", columnDefinition = ("int(10) comment '会员等级:1、普通会员，2、VIP,3、商家会员，4、产品会员，5、业务员会员，6、白名单会员'"))
	private int memberGrade = 1;
	// ==================积分等级=========================
	@Column(name = "member_point", columnDefinition = ("int(10) comment '积分'"))
	private int memberPoint = 0;
	// 状态:1为正常通用户,2、重点客户、3、黑名单用户
	@Column(name = "status", columnDefinition = ("int(10) comment '状态：1为正常通用户,2、重点客户、3、黑名单用户'"))
	private int status = 0;
	// 加锁:1为锁住用户
	@Column(name = "locked", columnDefinition = ("int(10) comment '锁'"))
	private int locked = 0;
	// ==================注册登录系统信息==================
	@Column(name = "reg_ip", columnDefinition = ("varchar(64) comment '注册IP'"))
	private String regIp = "";
	@Column(name = "reg_date_time", columnDefinition = ("varchar(64) comment '注册时间'"))
	@Temporal(TemporalType.TIMESTAMP)
	private Date regDateTime;
	@Column(name = "reg_address", columnDefinition = ("varchar(64) comment '注册地址'"))
	private String regAddress = "";
	@Column(name = "login_count", columnDefinition = ("int(8) comment '登录次数'"))
	private int loginCount = 0;
	@Column(name = "login_address", columnDefinition = ("varchar(256) comment '登录地址'"))
	private String loginAddress = "";
	@Column(name = "login_date_time", columnDefinition = ("varchar(64) comment '最的一次登录时间'"))
	private String loginDateTime = "";
	@Column(name = "login_ip", columnDefinition = ("varchar(64) comment '登录IP'"))
	private String loginIp = "";

	// ==================创建与编辑信息======================
	// 操作信息
	@Column(name = "editor_id", columnDefinition = ("int(10) comment '编辑人ID'"))
	private int editorId = 0;// 编辑人Id
	@Column(name = "editor_name", columnDefinition = ("varchar(64) comment '编辑人'"))
	private String editorName = "";// 编辑人
	@Column(name = "edit_time")
	@Temporal(TemporalType.TIMESTAMP)
	private Date editTime;// 编辑时间
	@Column(name = "creater_id", columnDefinition = ("int(10) comment '创建人id'"))
	private int createrId = 0;// 编辑人Id
	@Column(name = "creater", columnDefinition = ("varchar(64) comment '创建人'"))
	private String creater = "";// 编辑人
	@Column(name = "create_time")
	@Temporal(TemporalType.TIMESTAMP)
	private Date createTime;
	@Column(name = "delete_flag", columnDefinition = ("int(1) comment '删除标识'"))
	private int deleteFlag = 0;// 默认为不删除，1为删除

	// ==================信息审核字段======================
	@Column(name = "checker_id", columnDefinition = ("varchar(64) comment '审核人ID'"))
	private String checkerId = "";
	@Column(name = "checker", columnDefinition = ("varchar(32) comment '审核人'"))
	private String checker = "";
	@Column(name = "check_dt", columnDefinition = ("varchar(32) comment '审核日期'"))
	private String checkDT = "";
	@Column(name = "check_msg", columnDefinition = ("varchar(512) comment '审核信息'"))
	private String checkMsg = "";
	// 0为待审核,1为已审核确认,2为审核末通过
	@Column(name = "check_status", columnDefinition = ("int(1) comment '0为待审核,1为已审核确认,2为审核末通过'"))
	private int checkStatus = 1;

	// 谁看过来，关注列表
	@Transient
	private List<BrowseMemberInfo> browseMemberList;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public int getSex() {
		return sex;
	}

	public void setSex(int sex) {
		this.sex = sex;
	}

	public String getBirthday() {
		return birthday;
	}

	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public int getWeight() {
		return weight;
	}

	public void setWeight(int weight) {
		this.weight = weight;
	}

	public String getHeadImageUrl() {
		return headImageUrl;
	}

	public void setHeadImageUrl(String headImageUrl) {
		this.headImageUrl = headImageUrl;
	}

	public String getNationality() {
		return nationality;
	}

	public void setNationality(String nationality) {
		this.nationality = nationality;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public String getAreaPoint() {
		return areaPoint;
	}

	public void setAreaPoint(String areaPoint) {
		this.areaPoint = areaPoint;
	}

	public String getAreaPoint_b() {
		return areaPoint_b;
	}

	public void setAreaPoint_b(String areaPoint_b) {
		this.areaPoint_b = areaPoint_b;
	}

	public String getInterest() {
		return interest;
	}

	public void setInterest(String interest) {
		this.interest = interest;
	}

	public String getBarcodeUrl() {
		return barcodeUrl;
	}

	public void setBarcodeUrl(String barcodeUrl) {
		this.barcodeUrl = barcodeUrl;
	}

	public String getMemberDesc() {
		return memberDesc;
	}

	public void setMemberDesc(String memberDesc) {
		this.memberDesc = memberDesc;
	}

	public int getMemberGrade() {
		return memberGrade;
	}

	public void setMemberGrade(int memberGrade) {
		this.memberGrade = memberGrade;
	}

	public int getMemberPoint() {
		return memberPoint;
	}

	public void setMemberPoint(int memberPoint) {
		this.memberPoint = memberPoint;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getLocked() {
		return locked;
	}

	public void setLocked(int locked) {
		this.locked = locked;
	}

	public String getRegIp() {
		return regIp;
	}

	public void setRegIp(String regIp) {
		this.regIp = regIp;
	}

	public Date getRegDateTime() {
		return regDateTime;
	}

	public void setRegDateTime(Date regDateTime) {
		this.regDateTime = regDateTime;
	}

	public String getRegAddress() {
		return regAddress;
	}

	public void setRegAddress(String regAddress) {
		this.regAddress = regAddress;
	}

	public int getLoginCount() {
		return loginCount;
	}

	public void setLoginCount(int loginCount) {
		this.loginCount = loginCount;
	}

	public String getLoginAddress() {
		return loginAddress;
	}

	public void setLoginAddress(String loginAddress) {
		this.loginAddress = loginAddress;
	}

	public String getLoginDateTime() {
		return loginDateTime;
	}

	public void setLoginDateTime(String loginDateTime) {
		this.loginDateTime = loginDateTime;
	}

	public String getLoginIp() {
		return loginIp;
	}

	public void setLoginIp(String loginIp) {
		this.loginIp = loginIp;
	}

	public int getEditorId() {
		return editorId;
	}

	public void setEditorId(int editorId) {
		this.editorId = editorId;
	}

	public String getEditorName() {
		return editorName;
	}

	public void setEditorName(String editorName) {
		this.editorName = editorName;
	}

	public Date getEditTime() {
		return editTime;
	}

	public void setEditTime(Date editTime) {
		this.editTime = editTime;
	}

	public int getCreaterId() {
		return createrId;
	}

	public void setCreaterId(int createrId) {
		this.createrId = createrId;
	}

	public String getCreater() {
		return creater;
	}

	public void setCreater(String creater) {
		this.creater = creater;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public int getDeleteFlag() {
		return deleteFlag;
	}

	public void setDeleteFlag(int deleteFlag) {
		this.deleteFlag = deleteFlag;
	}

	public String getCheckerId() {
		return checkerId;
	}

	public void setCheckerId(String checkerId) {
		this.checkerId = checkerId;
	}

	public String getChecker() {
		return checker;
	}

	public void setChecker(String checker) {
		this.checker = checker;
	}

	public String getCheckDT() {
		return checkDT;
	}

	public void setCheckDT(String checkDT) {
		this.checkDT = checkDT;
	}

	public String getCheckMsg() {
		return checkMsg;
	}

	public void setCheckMsg(String checkMsg) {
		this.checkMsg = checkMsg;
	}

	public int getCheckStatus() {
		return checkStatus;
	}

	public void setCheckStatus(int checkStatus) {
		this.checkStatus = checkStatus;
	}

	public List<BrowseMemberInfo> getBrowseMemberList() {
		return browseMemberList;
	}

	public void setBrowseMemberList(List<BrowseMemberInfo> browseMemberList) {
		this.browseMemberList = browseMemberList;
	}

	@Override
	public String toString() {
		return "Member [id=" + id + ", uuid=" + uuid + ", nickName=" + nickName + ", mobile=" + mobile + ", wexinId="
				+ wexinId + ", password=" + password + ", email=" + email + ", realName=" + realName + ", sex=" + sex
				+ ", birthday=" + birthday + ", age=" + age + ", height=" + height + ", weight=" + weight
				+ ", headImageUrl=" + headImageUrl + ", nationality=" + nationality + ", province=" + province
				+ ", city=" + city + ", area=" + area + ", areaPoint=" + areaPoint + ", areaPoint_b=" + areaPoint_b
				+ ", interest=" + interest + ", barcodeUrl=" + barcodeUrl + ", memberDesc=" + memberDesc
				+ ", memberGrade=" + memberGrade + ", memberPoint=" + memberPoint + ", status=" + status + ", locked="
				+ locked + ", regIp=" + regIp + ", regDateTime=" + regDateTime + ", regAddress=" + regAddress
				+ ", loginCount=" + loginCount + ", loginAddress=" + loginAddress + ", loginDateTime=" + loginDateTime
				+ ", loginIp=" + loginIp + ", editorId=" + editorId + ", editorName=" + editorName + ", editTime="
				+ editTime + ", createrId=" + createrId + ", creater=" + creater + ", createTime=" + createTime
				+ ", deleteFlag=" + deleteFlag + ", checkerId=" + checkerId + ", checker=" + checker + ", checkDT="
				+ checkDT + ", checkMsg=" + checkMsg + ", checkStatus=" + checkStatus + ", browseMemberList="
				+ browseMemberList + "]";
	}

	public String getWexinId() {
		return wexinId;
	}

	public void setWexinId(String wexinId) {
		this.wexinId = wexinId;
	}

}
